define(function(require, exports, module) {
    //结合es5面向对象编程

    var PageHeader = require('pageHeader');
    var PageFooter = require('pageFooter');
    var PageContent = require('pageContent');
    

    // var obj = {
    //     name:'xiaohong',
    //     fn: function () {
    //         this.name
    //     }
    // }

    function Lession8(opt) {
        if (!(this instanceof Lession8)) {
            return new Lession8(opt);
        }
        
        this.name = '小洪11';
    }

    Lession8.prototype = {
        init:function () {
            console.log(this.name);
            this.render();
        },
        render: function () {
            //页头的处理
            var PH = new PageHeader({age: 30});
            PH.init();

            //内容
            var PC = new PageContent();
            PC.init();

            //页尾
            var PT = new PageFooter();
            PT.init();
        }
    }
    
    console.log(module, '<--');
    // exports = Lession8;
    module.exports = Lession8
});